package com.lyx.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 签到日志表
 * @TableName t_sign_log
 */
@TableName(value ="t_sign_log")
@NoArgsConstructor
@Data
public class SignLog implements Serializable {
    /**
     * 序号,主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    @TableField(value = "uid")
    private Integer uid;

    /**
     * 获得积分
     */
    @TableField(value = "s_exp")
    private Integer sExp;

    /**
     * 信息
     */
    @TableField(value = "info")
    private String info;

    /**
     * 类型
     */
    @TableField(value = "type")
    private String type;

    /**
     * 签到时间
     */
    @TableField(value = "s_time")
    private Date sTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public SignLog(Integer uid, Integer sExp, String info, String type) {
        this.uid = uid;
        this.sExp = sExp;
        this.info = info;
        this.type = type;
        this.sTime = new Date();
    }
}
